<template>
    <div class="studentlookdiv">
        <Collapse v-model="value1">
			<Panel v-for="(item,index) in detailed" :key="index" name="0" v-if="index == 0">
				{{item.name}}
				<p slot="content">
					<table class="sui-table table-vzebra">
					<tbody>
						<tr>
						<td>姓名</td>
						<td>{{item.dataList.student_name?item.dataList.student_name.zh?item.dataList.student_name.zh:item.dataList.student_name.mn:''}}</td>
						<td>性别</td>
						<td>{{item.dataList.sexs?item.dataList.sexs.dictionary_name?item.dataList.sexs.dictionary_name.zh ? item.dataList.sexs.dictionary_name.zh :item.dataList.sexs.dictionary_name.mn:'':'' }}</td>
						<td rowspan="7" style="background-color: transparent;"><img :src="(item.dataList && item.dataList.picture && item.dataList.picture!=0) ? item.dataList.picture : 'http://1.180.78.87/dc/framework/common/images/noPic_150x150.jpg'" width="150" height="180"></td>
						</tr>

						<tr>
						<td>出生年月</td>
						<td>{{item.dataList ? item.dataList.birthday : ''}}</td>
						<td>学生学号</td>
						<td>{{item.dataList ? item.dataList.student_learncode : ''}}</td>
						</tr>
						<tr>
						<td>学籍号</td>
						<td>{{item.dataList ? item.dataList.student_number : ''}}</td>
						<td>民族</td>
						<td>{{item.dataList.ehnic?item.dataList.ehnic.dictionary_name.zh ? item.dataList.ehnic.dictionary_name.zh  : item.dataList.ehnic.dictionary_name.mn:'' }}</td>
						</tr>
						<tr>
						<td>证件号码</td>
						<td>{{item.dataList ? item.dataList.identityard_num : ''}}</td>
						<td>国籍</td>
						<td>{{item.dataList ? (item.dataList.country_all ? item.dataList.country_all.dictionary_name.zh :'') : ''}}</td>
						</tr>
						<tr>
						<td>出生地</td>
						<td>{{item.dataList ? item.dataList.birth : ''}}</td>
						<td>籍贯</td>
						<td>{{item.dataList ? item.dataList.native : ''}}</td>
						</tr>
						<tr>
						<td>港澳台侨</td>
						<td>{{item.dataList ? (item.dataList.hkmtb== 1 ? '是' : '否') : ''}}</td>
						<td>健康状况</td>
						<td>{{item.dataList ? (item.dataList.health_status ? item.dataList.health_status.dictionary_name.zh:'') :''}}</td>
						</tr>
						<tr>

						<td>邮箱</td>
						<td>{{item.dataList ? (item.dataList.contact ? item.dataList.contact.email:'') : ''}}</td>
						<td>政治面貌</td>
						<td>{{item.dataList ? (item.dataList.political_status ? item.dataList.political_status.dictionary_name.zh:'') :''}}</td>

						</tr>
					</tbody>
					</table>
				</p>
			</Panel>
			<Panel v-for="(item,index) in detailed" :key="index" name="1" v-if="index == 1">
				{{item.name}}
				<p slot="content">
					<table class="sui-table table-vzebra">
					<tbody>
						<tr>
						<td>入学年月</td>
						<td>{{item.dataList.learnstatus ? item.dataList.learnstatus.start_year:''}}</td>
						<td>入学方式</td>
						<td>{{item.dataList.learnstatus ? (item.dataList.learnstatus.admission_methods ? item.dataList.learnstatus.admission_methods.dictionary_name.zh:'') : ''}}</td>
						</tr>
						<tr>
						<td>年级</td>
						<td>{{item.dataList.learnstatus ? (item.dataList.learnstatus.grade ? item.dataList.learnstatus.grade.grade_name.zh:'') : ''}}</td>
						<td>班级</td>
						<td>{{item.dataList.learnstatus ? (item.dataList.learnstatus.eclass ? item.dataList.learnstatus.eclass.eclass_name.zh:'') : ''}}</td>
						</tr>
						<tr>
						<td>学生来源</td>
						<td>{{item.dataList.learnstatus ? (item.dataList.learnstatus.student_from ? item.dataList.learnstatus.student_from.dictionary_name.zh:'') : ''}}</td>
						<td>就读方式</td>
						<td>{{item.dataList.learnstatus ? (item.dataList.learnstatus.way_to_study==1 ? '寄宿' : '走读') : ''}}</td>
						</tr>
					</tbody>
					</table>
				</p>
			</Panel>
			<Panel v-for="(item,index) in detailed" :key="index" name="2" v-if="index == 2">
				{{item.name}}
				<p slot="content">

					<table class="sui-table table-vzebra">
					<tbody>
						<tr>
						<td>姓名拼音</td>
						<td>{{item.dataList.auxiliary ? item.dataList.auxiliary.py_name.zh:''}}</td>
						<td>曾用名</td>
						<td>{{item.dataList.auxiliary ? item.dataList.auxiliary.used_name.zh:''}}</td>
						</tr>
						<tr>
						<td>特长</td>
						<td>{{item.dataList.auxiliary ? item.dataList.auxiliary.specialty.zh:''}}</td>
						<td>身份证件有效期</td>
						<td>{{item.dataList.auxiliary ? item.dataList.auxiliary.effective_date : ''}}</td>
						</tr>
						<tr>
						<td>户口性质</td>
						<td>{{item.dataList.auxiliary ? (item.dataList.auxiliary.account_type_id==1 ? '非农业户口' : '农业户口'):''}}</td>
						<td>户口所在地</td>
						<!-- <td>{{item.dataList.auxiliary ? item.dataList.auxiliary.account_location.region_name.zh+item.dataList.auxiliary.account_location_city.region_name.zh+item.dataList.auxiliary.account_location_county.region_name.zh : ''}}</td> -->
						</tr>
						<tr>
						<td>血型</td>
						<td>{{item.dataList.auxiliary ? (item.dataList.auxiliary.blood ? item.dataList.auxiliary.blood.dictionary_name.zh:'') : ''}}</td>
						</tr>
					</tbody>
					</table>
				</p>
			</Panel>
			<Panel v-for="(item,index) in detailed" :key="index" name="3" v-if="index == 3">
				{{item.name}}
				<p slot="content">
					<table class="sui-table table-vzebra">
					<tbody>
						<tr>
						<td>现住址</td>
						<td>{{item.dataList.contact ? item.dataList.contact.current_address?item.dataList.contact.current_address.zh :'':''}}</td>
						<td>通讯住址</td>
						<td>{{item.dataList.contact ?item.dataList.contact.communication_address? item.dataList.contact.communication_address.zh :'':''}}</td>
						</tr>
						<tr>
						<td>家庭地址</td>
						<td>{{item.dataList.contact ? item.dataList.contact.home_address?item.dataList.contact.home_address.zh :'':''}}</td>
						<td>联系电话</td>
						<td>{{item.dataList.contact ? item.dataList.contact.tel :''}}</td>
						</tr>
						<tr>
						<td>邮箱</td>
						<td>{{item.dataList.contact ? item.dataList.contact.email :''}}</td>
						<td>邮编</td>
						<td>{{item.dataList.contact ? item.dataList.contact.postal_code :''}}</td>
						</tr>
						<tr>
						<td>主页地址</td>
						<td>{{item.dataList.contact ? item.dataList.contact.index_address :''}}</td>
						</tr>
					</tbody>
					</table>
				</p>
			</Panel>
			<Panel v-for="(item,index) in detailed" :key="index" name="4" v-if="index == 4">
				{{item.name}}
				<p slot="content">
					<table class="sui-table-teshu table-vzebra">
					<tbody>
						<tr>
						<td>是否独生子女</td>
						<td>{{item.dataList.expansion ? (item.dataList.expansion.is_onlychild==1 ? '是' : '否'):''}}</td>
						<td>是否受过学前教育</td>
						<td>{{item.dataList.expansion ? (item.dataList.expansion.is_pre_school_education==1 ? '是' : '否'):''}}</td>
						<td>残疾人类型</td>
						<td>{{item.dataList.expansion ? (item.dataList.expansion.disabled_status ? item.dataList.expansion.disabled_status.dictionary_name.zh:'') : ''}}</td>
						</tr>
						<tr>
						<td>是否孤儿</td>
						<td>{{item.dataList.expansion ? (item.dataList.expansion.is_orphan==1 ? '是' : '否'):''}}</td>
						<td>是否烈士或优抚子女</td>
						<td>{{item.dataList.expansion ? (item.dataList.expansion.is_martyr==1 ? '是' : '否'):''}}</td>
						<td>随班就读</td>
						<td>{{item.dataList.expansion ? (item.dataList.expansion.is_study_in_class==1 ? '是' : '否'):''}}</td>
						</tr>
						<tr>
						<td>是否由政府购买学位</td>
						<td>{{item.dataList.expansion ? (item.dataList.expansion.is_government_degree==1 ? '是' : '否'):''}}</td>
						<td>是否需要申请过资助</td>
						<td>{{item.dataList.expansion ? (item.dataList.expansion.is_funding==1 ? '是' : '否'):''}}</td>
						<td>是否享受一补</td>
						<td>{{item.dataList.expansion ? (item.dataList.expansion.is_supplement==1 ? '是' : '否'):''}}</td>
						</tr>
						<tr>
						<td>是否留守儿童</td>
						<td>{{item.dataList.expansion ? (item.dataList.expansion.is_left_behind_children==1 ? '是' : '否'):''}}</td>
						<td>是否迁随子女</td>
						<td>{{item.dataList.expansion ? (item.dataList.expansion.is_move_with==1 ? '是' : '否'):''}}</td>
						</tr>
					</tbody>
					</table>
				</p>
			</Panel>
			<Panel v-for="(item,index) in detailed" :key="index" name="5" v-if="index == 5">
				{{item.name}}
				<p slot="content">

					<table class="sui-table table-vzebra">
					<tbody>
						<tr>
						<td>上下学距离</td>
						<td>{{item.dataList.traffic ? item.dataList.traffic.distance:''}}KM</td>
						<td>上下学交通方式</td>
						<td>{{item.dataList.traffic ? (item.dataList.traffic.traffic_release ? item.dataList.traffic.traffic_release.dictionary_name.zh:'') : ''}}</td>
						</tr>
						<tr>
						<td>是否乘坐校车</td>
						<td>{{item.dataList.traffic ? (item.dataList.traffic.is_school_bus==1 ? '是' : '否'):''}}</td>
						</tr>
					</tbody>
					</table>
				</p>
			</Panel>
			<Panel v-for="(item,index) in detailed" :key="index" :name="index.toString()" v-if="item.com=='physicalhealth'">
				{{item.name}}
				<p slot="content">
					<physical-health-deail v-if="userid" :userId="userid" :sex="sex"></physical-health-deail>
				</p>
			</Panel>
			<Panel v-for="(item,index) in detailed" :key="index" :name="index.toString()" v-if="index >= 6 && item.com!='physicalhealth'">
				{{item.name}}
				<p slot="content">
					<Table :columns="item.columns" :data="item.dataList"></Table>
				</p>
			</Panel>
        </Collapse>
        <Spin size="large" fix v-if="spinShow"></Spin>
    </div>

</template>

<script>
  export default {
    props: {
        infoId: {
            type: [Boolean,Number,Object,Array],
            default: false
        },
    },
    components: {
		PhysicalHealthDeail: resolve => {require(['./PhysicalHealthDeail.vue'], resolve);},
    },
    data() {
      	return {
			value1: '0',
		  	detailed :[
                {
					name:'学生信息',
					com:'basicxx',
					columns:[],
					dataList:null
				},
				{
					name:'学籍基本信息',
					com:'basic',
					columns:[],
					dataList:{learnstatus:''}
				},
				{
					name:'个人辅助信息',
					com:'auxiliary',
					columns:[],
					dataList:{auxiliary:''}
				},
				{
					name:'个人联系信息',
					com:'contact',
					columns:[],
					dataList:{contact:''}
				},
				{
					name:'个人扩展信息',
					com:'expand',
					columns:[],
					dataList:{expansion:''}
				},
				{
					name:'上下学交通信息',
					com:'traffic',
					columns:[],
					dataList:{traffic:''}
				},
				{
					name:'学业经历',
					com:'academicexperience',
					columns:[
						{
							title: '学年学期',
							render:(h,params)=>{
								let name = params.row.schoolyear_semester.zh?params.row.schoolyear_semester.zh:params.row.schoolyear_semester.mn;
								return h('div',name)
							}
						},
						{
							title: '考试名称',
							render:(h,params)=>{
								let name = params.row.exam_name.zh?params.row.exam_name.zh:params.row.exam_name.mn;
								return h('div',name)
							}
						},
						{
							title: '考试成绩',
							key: 'achievement'
						}
					],
					dataList:[]
				},
				{
					name:'入学信息',
					com:'admissioninformation',
					columns:[
						{
							title: '入学年份',
							width:100,
							key: 'start_year',
						},
						{
							title: '蒙语文',
							width:80,
							key: 'mongolian_chinese'
						},
						{
							title: '数学',
							width:60,
							key: 'mathematics'
						},
						{
							title: '汉语',
							width:60,
							key: 'chinese'
						},
						{
							title: '蒙授英文',
							width:100,
							key: 'mongolian_english'
						},
						{
							title: '思想品德',
							width:100,
							key: 'moral'
						},
						{
							title: '历史',
							width:60,
							key: 'history'
						},
						{
							title: '物理',
							width:60,
							key: 'physics'
						},
						{
							title: '化学',
							width:60,
							key: 'chemistry'
						},
						{
							title: '信息技术',
							width:100,
							key: 'information_echnology'
						},
						{
							title: '体育',
							width:60,
							key: 'sports'
						},
						{
							title: '生物',
							width:60,
							key: 'biological'
						},
						{
							title: '地理',
							width:60,
							key: 'geography'
						},
						{
							title: '理化实验',
							width:100,
							key: 'experiment'
						},
						{
							title: '照顾分',
							width:80,
							key: 'take_care_score'
						},
						{
							title: '特长得分',
							width:100,
							key: 'specialty_score'
						},
						{
							title: '总分（含照顾分）',
							width:100,
							key: 'total_score'
						},
						{
							title: '入学志愿',
							width:100,
							key: 'enrollments_name'
						},
						{
							title: ' ',
						},
					],
					dataList:[]
				},
				{
					name:'学习经历',
					com:'learningexperience',
					columns:[
						{
							title: '原班级',
							render: (h, params) => {
							if(params.row.original_eclass){
								let name = params.row.original_eclass.grade.grade_name+' '+ params.row.original_eclass.eclass_name
								return h('div', name);
							}
							}
						},
						{
							title: '现班级',
							render: (h, params) => {
							if(params.row.go_eclass){
								let name = params.row.go_eclass.grade.grade_name.zh?params.row.go_eclass.grade.grade_name.zh:params.row.go_eclass.grade.grade_name.mn+' '+params.row.go_eclass.eclass_name.zh?params.row.go_eclass.eclass_name.zh:params.row.go_eclass.eclass_name.mn
								return h('div', name);
							}
							}
						},
						{
							title: '异动类型',
							render: (h, params) => {
								let name = params.row.transaction_type ? params.row.transaction_type.dictionary_name?params.row.transaction_type.dictionary_name.zh:'':''
								return h('div', name);
							}
						},
						{
							title: '异动原因',
							render: (h, params) => {
								let name = params.row.reason?params.row.reason.zh?params.row.reason.zh:params.row.reason.mn:''
								return h('div', name);
							}
						},
						{
							title: '异动时间',
							key: 'eclass_time',
						},
					],
					dataList:[]
				},
				{
					name:'体质健康',
					com:'physicalhealth',
					columns:[
						{
							title: '学年',
							render: (h, params) => {
								let name = params.row.schoolyear ? params.row.schoolyear.schoolyear_name:''
								return h('div', name);
							}
						},
						{
							title: '学期',
							render: (h, params) => {
								let name = params.row.semester ? params.row.semester.semester_name:''
								return h('div', name);
							}
						},
						{
							title: '单项指标',
							render: (h, params) => {
							if(params.row.records!==null){
								let name=new Array()
								params.row.records.forEach((item,index) => {
								if(item.indicator_item.score_type==1){
									name[index]=h('p',"【"+item.indicator_item_name+"】:"+item.score+"分")
								}
								});
								return h('div', name);
							}
							}

						},
						{
							title: '附加指标',
							render: (h, params) => {
							if(params.row.records!==null){
								let name=new Array()
								params.row.records.forEach((item,index) => {
								if(item.indicator_item.score_type==2){
									name[index]=h('p',"【"+item.indicator_item_name+"】:"+item.score+"分")
								}
								});
								return h('div', name);
							}
							}
						},
						{
							title: '总分',
							key: 'schoolyear_score'
						}
					],
					dataList:[]
				},
				{
					name:'荣誉',
					com:'honor',
					columns:[
						{
							title: '荣誉名称',
							key: 'honor_name',
						},
						{
							title: '颁发单位',
							key: 'granted_unit',
						},
						{
							title: '获奖时间',
							key: 'selected_time'
						},
						{
							title: '等级',
							render: (h, params) => {
							if(params.row.selectdlevel!==null){
								let selectdlevel = params.row.selectdlevel ? params.row.selectdlevel.dictionary_name:''
								return h('div', selectdlevel);
							}
							}
						},
						{
							title: '名次',
							key: 'ranking'
						},
					],
					dataList:[]
				},
				{
					name:'保险',
					com:'insurance',
					columns:[
						{
							title: '学年',
							render: (h, params) => {
							let schoolyear_name = params.row.schoolyear?params.row.schoolyear.schoolyear_name.zh?params.row.schoolyear.schoolyear_name.zh:params.row.schoolyear.schoolyear_name.mn:''
							return h('div', schoolyear_name);
							}
						},
						{
							title: '保险类型',
							render: (h, params) => {
							let title = params.row.insurancetypes.dictionary_name
							return h('div', title);
							}
						},
						{
							title: '投保时间',
							key: 'insurance_start_at'
						},
						{
							title: '结报时间',
							key: 'insurance_end_at'
						},
					],
					dataList:[]
				},
				{
					name:'德育',
					com:'moraleducation',
					columns:[
						{
							title: '学年',
							key: 'schoolyear_name',
							width:150
						},
						{
							title: '学期',
							key: 'semester_name',
							width:150
						},
						{
							title: '加分项',
							key: 'plusrules',
							render: (h, params) => {
								let name=new Array()
								params.row.plusrules.forEach((item,index) => {
								name[index]=h('p',"【"+item.education_name+"】"+item.entry_content+": +"+item.fixed_score+"分")
								});
								return h('div', name);
							}
						},
						{
							title: '减分项',
							key: 'minusrules',
							render: (h, params) => {
								let name=new Array()
								params.row.minusrules.forEach((item,index) => {
								name[index]=h('p',"【"+item.education_name+"】"+item.entry_content+": -"+item.fixed_score+"分")
								});
								return h('div', name);
							}
						},
						{
							title: '总分数',
							key: 'sum',
							width:200
						},
					],
					dataList:[]
				},
				{
					name:'评价',
					com:'evaluation',
					columns:[
						{
							title: '评价类型',
							width: 180,
							render: (h, params) => {
								let name=params.row.dictionary ? params.row.dictionary.dictionary_name:''
								return h('div', name)
							}
						},
						{
							title: '评价者',
							width: 180,
							render: (h, params) => {
								let name=params.row.evaluator.student_name ? params.row.evaluator.student_name :  params.row.evaluator.teacher_name
								return h('div', name)
							}
						},
						{
							title: '星级',
							width: 80,
							key:'star_rating',
						},
						{
							title: '内容',
							render: (h, params) => {
                        let title= params.row.content.zh?params.row.content.zh:params.row.content.mn;
                        return h('div', title);
                    }
						},
					],
					dataList:[]
				},
			],
			userid:null,
			sex:null,
			student_base_id:null,
			spinShow: true,
      	}
    },
    methods: {

        /************************************************************
         *
         * 学业经历数据请求
         *
         ************************************************************/
		AcademicExperience(){
			this.$http.get('api/student/v1/studentacademic/lists?user_id='+this.userid)
			.then(val=>{
				let arr = Object.keys(val.data).length == 0 ? [] : val.data
				this.detailed.find(i => {return i.name == '学业经历'}).dataList = arr
			})
			.catch(err=>{
				console.log(err);
				if(err.code && err.code==422) {
					this.$Message.error(err.message);
				}
			})

		},

        /************************************************************
         *
         * 体质健康数据请求
         *
         ************************************************************/
		PhysicalHealth(){
			this.$http.get('api/medicalhealth/v1/physical/user_record?user_id='+this.userid)
			.then(val=>{
				let arr = val.data
				this.detailed.find(i => {return i.name == '体质健康'}).dataList = arr
			})
			.catch(err=>{
				console.log(err);
				if(err.code && err.code==422) {
					this.$Message.error(err.message);
				}
			})

		},

        /************************************************************
         *
         * 荣誉数据请求
         *
         ************************************************************/
		Honor(){
			this.$http.get('api/honor/v1/honor/all_honor?user_id='+this.userid)
			.then(val=>{
				let arr = val.data
				this.detailed.find(i => {return i.name == '荣誉'}).dataList = arr
			})
			.catch(err=>{
				console.log(err);
				if(err.code && err.code==422) {
					this.$Message.error(err.message);
				}
			})

		},

        /************************************************************
         *
         * 保险数据请求
         *
         ************************************************************/
		Insurance(){
			this.$http.get('api/security/v1/insurance/all_insurance?user_id='+this.userid)
			.then(val=>{
				let arr = val.data
				this.detailed.find(i => {return i.name == '保险'}).dataList = arr
			})
			.catch(err=>{
				console.log(err);
				if(err.code && err.code==422) {
					this.$Message.error(err.message);
				}
			})

		},

        /************************************************************
         *
         * 学习经历数据请求
         *
         ************************************************************/
		LearningExperience(){
			this.$http.get('api/student/v1/studentlearnstatus/user_eclassrecords?user_id='+this.userid)
			.then(val=>{
				let arr = val.data
				this.detailed.find(i => {return i.name == '学习经历'}).dataList = arr
			})
			.catch(err=>{
				console.log(err);
				if(err.code && err.code==422) {
					this.$Message.error(err.message);
				}
			})

		},

        /************************************************************
         *
         * 入学信息数据请求
         *
         ************************************************************/
		AdmissionInformation(){
			this.AdmissionInformationList=[]
			this.$http.get('api/student/v1/juniorcourse/user_junior_info?user_id='+this.userid)
			.then(val=>{
				let arr = []
				if(val.data.student_name){
					arr.push(val.data)
				}else{
					arr=[]
				}
				this.detailed.find(i => {return i.name == '入学信息'}).dataList = arr
			})
			.catch(err=>{
				console.log(err);
				if(err.code && err.code==422) {
					this.$Message.error(err.message);
				}
			})

		},

        /************************************************************
         *
         * 德育历数据请求
         *
         ************************************************************/
		MoralEducation(){
			this.$http.get('api/moral/v1/moracheck/studentcheckssch?student_base_id='+this.student_base_id)
			.then(val=>{
				let arr=[]
				if(val.data.length!==0){
					val.data.forEach((item,index)=>{
						item.semester.forEach((item1,index1)=>{
							arr.push({
								schoolyear_name:item.schoolyear_name,
								semester_name:item1.semester_name,
								sum:'加分：+'+item1.plus+'分 | 减分：-'+item1.minus+'分',
								plusrules:item1.plusrules,
								minusrules:item1.minusrules,
							})

						})

					})
				}else{
					arr=[]
				}
				this.detailed.find(i => {return i.name == '德育'}).dataList = arr
			})
			.catch(err=>{
				console.log(err);
				if(err.code && err.code==422) {
					this.$Message.error(err.message);
				}
			})

		},

        /************************************************************
         *
         * 评价数据请求
         *
         ************************************************************/
		Evaluation(){
			this.$http.get('api/evaluate/v1/student_evaluate/student_index?user_id='+this.userid)
			.then(val=>{
				let arr = val.data
				this.detailed.find(i => {return i.name == '评价'}).dataList = arr
			})
			.catch(err=>{
				console.log(err);
				if(err.code && err.code==422) {
					this.$Message.error(err.message);
				}
			})

		},

        /************************************************************
         *
         * 学生信息数据请求
         *
         ************************************************************/
		StudentInformation(){
			this.spinShow=true//加载完数据动画结束
			this.$http.get('api/student/information/getById/'+this.infoId)
            .then(val=>{
				let obj = val.data
				this.userid=obj.user_id
				this.sex= obj.sex
				this.student_base_id=obj.user_id
				
                // if(obj.birth_place){
                //     obj.birth=(obj.birth_place.region_slug?obj.birth_place.region_slug:'')+(obj.birth_place_city?obj.birth_place_city.region_slug?obj.birth_place_city.region_slug:'':'')+(obj.birth_place_county?obj.birth_place_county.region_slug?obj.birth_place_county.region_slug:'':'')
                // }
                // if(obj.native_place){
                //     obj.native=(obj.native_place.region_slug?obj.native_place.region_slug:'')+(obj.native_place_city.region_slug?obj.native_place_city.region_slug:'')+(obj.native_place_county.region_slug?obj.native_place_county.region_slug:'')
                // }
                // if(obj.auxiliary){
                //     if(obj.auxiliary.account_location){
                //         obj.auxiliary.account_location=(obj.auxiliary.account_location.region_name?obj.auxiliary.account_location.region_name:'')+(obj.auxiliary.account_location_city.region_name?obj.auxiliary.account_location_city.region_name:'')+(obj.auxiliary.account_location_county.region_name?obj.auxiliary.account_location_county.region_name:'')
                //     }
                // }
                this.detailed = [
                    {
                        name:'学生信息',
                        com:'basicxx',
                        columns:[],
                        dataList:obj
                    },
                    {
                        name:'学籍基本信息',
                        com:'basic',
                        columns:[],
                        dataList:obj
                    },
                    {
                        name:'个人辅助信息',
                        com:'auxiliary',
                        columns:[],
                        dataList:obj
                    },
                    {
                        name:'个人联系信息',
                        com:'contact',
                        columns:[],
                        dataList:obj
                    },
                    {
                        name:'个人扩展信息',
                        com:'expand',
                        columns:[],
                        dataList:obj
                    },
                    {
                        name:'上下学交通信息',
                        com:'traffic',
                        columns:[],
                        dataList:obj
                    },
                    {
                        name:'学业经历',
                        com:'academicexperience',
                        columns:[
                            {
                                title: '学年学期',
                                key: 'schoolyear_semester'
                            },
                            {
                                title: '考试名称',
								render:(h,params)=>{
									let name = params.row.exam_name.zh?params.row.exam_name.zh:params.row.exam_name.mn;
									return h('div',name)
								}
                            },
                            {
                                title: '考试成绩',
                                key: 'achievement'
                            }
                        ],
                        dataList:[]
                    },
                    {
                        name:'入学信息',
                        com:'admissioninformation',
                        columns:[
                            {
                                title: '入学年份',
                                width:100,
                                key: 'start_year',
                            },
                            {
                                title: '蒙语文',
                                width:80,
                                key: 'mongolian_chinese'
                            },
                            {
                                title: '数学',
                                width:60,
                                key: 'mathematics'
                            },
                            {
                                title: '汉语',
                                width:60,
                                key: 'chinese'
                            },
                            {
                                title: '蒙授英文',
                                width:100,
                                key: 'mongolian_english'
                            },
                            {
                                title: '思想品德',
                                width:100,
                                key: 'moral'
                            },
                            {
                                title: '历史',
                                width:60,
                                key: 'history'
                            },
                            {
                                title: '物理',
                                width:60,
                                key: 'physics'
                            },
                            {
                                title: '化学',
                                width:60,
                                key: 'chemistry'
                            },
                            {
                                title: '信息技术',
                                width:100,
                                key: 'information_echnology'
                            },
                            {
                                title: '体育',
                                width:60,
                                key: 'sports'
                            },
                            {
                                title: '生物',
                                width:60,
                                key: 'biological'
                            },
                            {
                                title: '地理',
                                width:60,
                                key: 'geography'
                            },
                            {
                                title: '理化实验',
                                width:100,
                                key: 'experiment'
                            },
                            {
                                title: '照顾分',
                                width:80,
                                key: 'take_care_score'
                            },
                            {
                                title: '特长得分',
                                width:100,
                                key: 'specialty_score'
                            },
                            {
                                title: '总分（含照顾分）',
                                width:100,
                                key: 'total_score'
                            },
                            {
                                title: '入学志愿',
                                width:100,
                                key: 'enrollments_name'
                            },
                            {
                                title: ' ',
                            },
                        ],
                        dataList:[]
                    },
                    {
                        name:'学习经历',
                        com:'learningexperience',
                        columns:[
                            {
                                title: '原班级',
                                render: (h, params) => {
                                if(params.row.original_eclass){
                                    let name = params.row.original_eclass.grade.grade_name.zh+' '+ params.row.original_eclass.eclass_name.zh
                                    return h('div', name);
                                }
                                }
                            },
                            {
                                title: '现班级',
                                render: (h, params) => {
                                if(params.row.go_eclass){
                                    let name = params.row.go_eclass.grade.grade_name.zh?params.row.go_eclass.grade.grade_name.zh:params.row.go_eclass.grade.grade_name.mn+' '+params.row.go_eclass.eclass_name.zh?params.row.go_eclass.eclass_name.zh:params.row.go_eclass.eclass_name.mn
                                    return h('div', name);
                                }
                                }
                            },
                            {
                                title: '异动类型',
                                render: (h, params) => {
                                    let name = params.row.transaction_type ? params.row.transaction_type?params.row.transaction_type.dictionary_name.zh:'':''
                                    return h('div', name);
                                }
                            },
                            {
                                title: '异动原因',
                                render: (h, params) => {
                                    let name = params.row.reason?params.row.reason.zh?params.row.reason.zh:params.row.reason.mn:''
                                    return h('div', name);
                                }
                            },
                            {
                                title: '异动时间',
                                key: 'eclass_time',
                            },
                        ],
                        dataList:[]
                    },
                    {
                        name:'体质健康',
                        com:'physicalhealth',
                        columns:[
                            {
                                title: '学年',
                                render: (h, params) => {
                                    let name = params.row.schoolyear ? params.row.schoolyear.schoolyear_name.zh:''
                                    return h('div', name);
                                }
                            },
                            {
                                title: '学期',
                                render: (h, params) => {
                                    let name = params.row.semester ? params.row.semester.semester_name.zh:''
                                    return h('div', name);
                                }
                            },
                            {
                                title: '单项指标',
                                render: (h, params) => {
                                if(params.row.records!==null){
                                    let name=new Array()
                                    params.row.records.forEach((item,index) => {
                                    if(item.indicator_item.score_type==1){
                                        name[index]=h('p',"【"+item.indicator_item_name.zh+"】:"+item.score+"分")
                                    }
                                    });
                                    return h('div', name);
                                }
                                }

                            },
                            {
                                title: '附加指标',
                                render: (h, params) => {
                                if(params.row.records!==null){
                                    let name=new Array()
                                    params.row.records.forEach((item,index) => {
                                    if(item.indicator_item.score_type==2){
                                        name[index]=h('p',"【"+item.indicator_item_name.zh+"】:"+item.score+"分")
                                    }
                                    });
                                    return h('div', name);
                                }
                                }
                            },
                            {
                                title: '总分',
                                key: 'schoolyear_score'
                            }
                        ],
                        dataList:[]
                    },
                    {
                        name:'荣誉',
                        com:'honor',
                        columns:[
                            {
                                title: '荣誉名称',
								render:(h,params)=>{
									let name = params.row.honor_name.zh?params.row.honor_name.zh:params.row.honor_name.mn;
									return h('div',name)
								}
                            },
                            {
                                title: '颁发单位',
								render:(h,params)=>{
									let name = params.row.granted_unit.zh?params.row.granted_unit.zh:params.row.granted_unit.mn;
									return h('div',name)
								}
                            },
                            {
                                title: '获奖时间',
                                key: 'selected_time'
                            },
                            {
                                title: '等级',
                                render: (h, params) => {
                                if(params.row.selectdlevel!==null){
                                    let selectdlevel = params.row.selectdlevel ? params.row.selectdlevel.dictionary_name.zh:''
                                    return h('div', selectdlevel);
                                }
                                }
                            },
                            {
                                title: '名次',
								render:(h,params)=>{
									let name = params.row.ranking.zh?params.row.ranking.zh:params.row.ranking.mn;
									return h('div',name)
								}
                            },
                        ],
                        dataList:[]
                    },
                    {
                        name:'保险',
                        com:'insurance',
                        columns:[
                            {
                                title: '学年',
                                render: (h, params) => {
                                let schoolyear_name = params.row.schoolyear?params.row.schoolyear.schoolyear_name.zh?params.row.schoolyear.schoolyear_name.zh:params.row.schoolyear.schoolyear_name.mn:''
                                return h('div', schoolyear_name);
                                }
                            },
                            {
                                title: '保险类型',
                                render: (h, params) => {
                                let title = params.row.insurancetypes.dictionary_name
                                return h('div', title);
                                }
                            },
                            {
                                title: '投保时间',
                                key: 'insurance_start_at'
                            },
                            {
                                title: '结报时间',
                                key: 'insurance_end_at'
                            },
                        ],
                        dataList:[]
                    },
                    {
                        name:'德育',
                        com:'moraleducation',
                        columns:[
                            {
                                title: '学年',
                                key: 'schoolyear_name',
                                width:150
                            },
                            {
                                title: '学期',
                                key: 'semester_name',
                                width:150
                            },
                            {
                                title: '加分项',
                                key: 'plusrules',
                                render: (h, params) => {
                                    let name=new Array()
                                    params.row.plusrules.forEach((item,index) => {
                                    name[index]=h('p',"【"+item.education_name+"】"+item.entry_content+": +"+item.fixed_score+"分")
                                    });
                                    return h('div', name);
                                }
                            },
                            {
                                title: '减分项',
                                key: 'minusrules',
                                render: (h, params) => {
                                    let name=new Array()
                                    params.row.minusrules.forEach((item,index) => {
                                    name[index]=h('p',"【"+item.education_name+"】"+item.entry_content+": -"+item.fixed_score+"分")
                                    });
                                    return h('div', name);
                                }
                            },
                            {
                                title: '总分数',
                                key: 'sum',
                                width:200
                            },
                        ],
                        dataList:[]
                    },
                    {
                        name:'评价',
                        com:'evaluation',
                        columns:[
                            {
                                title: '评价类型',
                                width: 180,
                                render: (h, params) => {
                                    let name=params.row.dictionary ? params.row.dictionary.dictionary_name:''
                                    return h('div', name)
                                }
                            },
                            {
                                title: '评价者',
                                width: 180,
                                render: (h, params) => {
                                    let name=params.row.evaluator.student_name ? params.row.evaluator.student_name :  params.row.evaluator.teacher_name
                                    return h('div', name)
                                }
                            },
                            {
                                title: '星级',
                                width: 80,
                                key:'star_rating',
                            },
                            {
                                title: '内容',
                                render: (h, params) => {
                        let title= params.row.content.zh?params.row.content.zh:params.row.content.mn;
                        return h('div', title);
                    }
                            },
                        ],
                        dataList:[]
                    },
                ],
                // this.AcademicExperience()
                // this.PhysicalHealth()
                // this.Honor()
                // this.Insurance()
                // this.LearningExperience()
                // this.AdmissionInformation()
                // this.MoralEducation()
				// this.Evaluation()
                this.spinShow=false//加载完数据动画结束
            }).catch(err=>{
                console.log(err);
                if(err.code && err.code==422) {
                    this.$Message.error(err.message);
                }
                this.spinShow=false//加载完数据动画结束
            })
		}


	},
	mounted() {
		this.StudentInformation()
	}

}
</script>
<style lang="less">
  @import './StudentBasicInformationLook.less';
</style>
